{{ "<!-- header -->" | safeHTML }}
<header>
  {{ if .Site.Params.top_header }}
  {{ "<!-- top header -->" | safeHTML }}
  <div class="top-header bg-secondary pt-2 pb-1">
    <div class="container">
      <div class="row align-items-center">
        {{ "<!-- social icons -->" | safeHTML }}
        <div class="col-lg-6 col-md-6 text-center text-md-left">
          <span class="text-white">{{ i18n "connect_with_us" }}:</span>
          <ul class="list-inline d-inline-block">
            {{ range .Site.Params.social }}
            <li class="list-inline-item"><a class="text-white d-inline-block p-2" href="{{ .link | safeURL }}"><i class="fa {{ .icon }}"></i></a></li>
            {{ end }}
          </ul>
        </div>
        {{ "<!-- mail and phone -->" | safeHTML }}
        <div class="col-lg-6 col-md-6 text-md-right text-center">
          <ul class="list-inline">
            <li class="list-inline-item mx-0 border-right border-secondary"><a class="text-white d-inline-block px-lg-3 px-2" href="mailto:{{ .Site.Params.email }}">{{ .Site.Params.email }}</a></li>
            <li class="list-inline-item mx-0"><a class="text-white d-inline-block px-lg-3 px-2" href="tel:{{ .Site.Params.mobile }}">{{ i18n "call_now" }}: <span class="text-primary">{{ .Site.Params.mobile }}</span></a></li>
          </ul>
        </div>
      </div>
    </div>
  </div>
  {{ "<!-- /top header -->" | safeHTML }}
  {{ end }}

  {{ "<!-- navigation -->" | safeHTML }}
  <div class="navigation bg-white position-relative">
    <div class="container">
      <nav class="navbar navbar-expand-lg navbar-light bg-white">
        <a class="navbar-brand" href="{{ .Site.BaseURL | relLangURL }}"><img class="img-fluid pb-lg-3" src="{{ .Site.Params.logo | relURL }}" width="189px" alt="{{ .Site.Title }}"></a>
        <button class="navbar-toggler border-0" type="button" data-toggle="collapse" data-target="#navigation"
          aria-controls="navigation" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse text-center" id="navigation">
          <ul class="navbar-nav ml-auto">
            <li class="nav-item">
              <a class="nav-link" href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Params.Home }}</a>
            </li>
            {{ range .Site.Menus.main }}
            {{ if .HasChildren }}
            <li class="nav-item dropdown">
              <a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true"
                aria-expanded="false">
                {{ .Name }}
              </a>
              <div class="dropdown-menu" >
                {{ range .Children }}
                <a class="dropdown-item" href="{{ .URL | relLangURL }}">{{ .Name }}</a>
                {{ end }}
              </div>
            </li>
            {{ else }}
            <li class="nav-item">
              <a class="nav-link" href="{{ .URL | relLangURL }}">{{ .Name }}</a>
            </li>
            {{ end }}
            {{ end }}
          </ul>

          <!-- Language List -->
          {{ if .IsTranslated }}
          <select class="m-2 border-0" id="select-language" onchange="location = this.value;">
            {{ $siteLanguages := .Site.Languages}}
            {{ $pageLang := .Page.Lang}}
            {{ range .Page.AllTranslations }}
            {{ $translation := .}}
            {{ range $siteLanguages }}
            {{ if eq $translation.Lang .Lang }}
            {{ $selected := false }}
            {{ if eq $pageLang .Lang}}
            <option id="{{ $translation.Language }}" value="{{ $translation.Permalink | relURL }}" selected>{{ .LanguageName }}</option>
            {{ else }}
            <option id="{{ $translation.Language }}" value="{{ $translation.Permalink | relURL }}">{{ .LanguageName }}</option>
            {{ end }}
            {{ end }}
            {{ end }}
            {{ end }}
          </select>
          {{ end }}

          {{ if .Site.Params.search }}
          {{ "<!-- search -->" | safeHTML }}
          <div class="search px-4">
            <button id="searchOpen" class="search-btn"><i class="fa fa-search text-dark"></i></button>
            <div class="search-wrapper">
              <form action="{{ `search`| relLangURL }}">
                <input class="search-box form-control" id="search-query" name="s" type="search" placeholder="{{ i18n `search_placeholder`}}">
              </form>
              <button id="searchClose" class="search-close"><i class="fa fa-close text-dark"></i></button>
            </div>
          </div>
          {{ end }}
          {{ if .Site.Params.navigation_button.enable }}
          {{ "<!-- get start btn -->" | safeHTML }}
          <a href="{{ .Site.Params.navigation_button.link | relLangURL }}" class="btn btn-primary hover-ripple">{{ i18n "join_us" }}</a>
          {{ end }}
        </div>
      </nav>
    </div>
  </div>
  {{ "<!-- /navigation -->" | safeHTML }}
</header>
{{ "<!-- /header -->" | safeHTML }}
